#{meta /}

#{javascript 'words/katakana-edit.js'/}

#{title word.value/}

#{body}

<div class="container">
	<div class="row">
		<div class="col-lg-10">
			<a href="${refer}" class="back-link"><span class="glyphicon glyphicon-arrow-left"></span>返回</a>
		</div>
		<div class="col-lg-2 text-right">
			<button class="btn btn-danger" id="btn-delete-word">删除</button>
		</div>
	</div>
	<div class="row">
		<div class="col-lg-12">
			<table class="table" id="main-table">
				<tr>
					<th>片假名词</th>
					<td>
						<div id="editable-value">${word.value}</div>
					</td>
				</tr>
				<tr>
					<th>含义</th>
					<td>
						<div id="editable-meanings" data-editable-value="${word.meaningsText}">
							#{list items:word.meanings, as:'meaning'}
								<div>${meaning}</div>
							#{/list}
							#{else}
								（无）
							#{/else}
						</div>
					</td>
				</tr>
				<tr>
					<th>词性</th>
					<td>
						<div class="form-inline" id="div-word-types">
							#{list items:types, as:'type'}
								<div class="checkbox">
									<label>
										<input type="checkbox" #{if type.has}checked#{/if}> ${type.name}
									</label>
								</div>
							#{/list}
						</div>
					</td>
				</tr>
				<tr>
					<th>词源</th>
					<td>
						<div id="editable-alias" data-editable-value="${word.alias}">
							#{if word.alias}
								${word.alias}
							#{/if}
							#{else}
								（无）
							#{/else}
						</div>
						<div class="form-inline" id="div-word-contexts">
							#{list items:contexts, as:'context'}
								<div class="radio">
									<label>
										<input type="radio" #{if context.has}checked#{/if} name="context"> ${context.name}
									</label>
								</div>
							#{/list}
						</div>
					</td>
				</tr>
			</table>
		</div>
	</div>
</div>

#{/body}

#{stylesheet}
	#main-table{
		margin-top:	20px;
	}
	#main-table th{
		width:	20%;
	}
#{/stylesheet}
